
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
import java.io.IOException;


public class GuestPanel extends NaviPanel {
	
	private MainWindow main;
	/**
	 * Create the panel.
	 */
	public GuestPanel(MainWindow window) {
		super(window);
		
		main = window;
		
		BufferedImage wp = null;
		try {
			wp = ImageIO.read(this.getClass().getResource("/home_gast.png"));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		JLabel wIcon = new JLabel(new ImageIcon(wp));
		wIcon.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				main.addGastPanel();
			}
		});
		add(wIcon, "cell 0 1");
		
		JLabel lblRegistrieren = new JLabel("Registrieren");
		lblRegistrieren.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				main.registrieren();
			}
		});
		add(lblRegistrieren, "cell 0 2");
		
		JLabel lblKontakt = new JLabel("Kontakt");
		lblKontakt.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				main.kontakt();
			}
		});
		add(lblKontakt, "cell 0 3");
		
	}

}
